package com.shxy.entity.user;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * 用户实体类
 */
@Entity
@Data
@Table(name = "t_user")
public class User {
    @Id
    private int id;
    private String username;    //账号
    private String role;        //角色
    @OneToOne
    private IdCard idCard;      //身份证信息
    private Date lastLogin;     //最后登录时间
    private String lastIp;          //最后登录ip
    private String status;      //状态

    @Transient
    private Password password;  //密码信息
}
